Skip to content

Pin GitHub Actions to commit SHAs - #486

Merged
joe4dev merged 1 commit into
mainfrom
devx-978-pin-github-actions-for-lstk
Sep 8, 2026
Merged

Pin GitHub Actions to commit SHAs#486
joe4dev merged 1 commit into
mainfrom
devx-978-pin-github-actions-for-lstk

Conversation

@joe4dev

@joe4dev joe4dev commented Sep 4, 2026

Copy link
Copy Markdown
Member

Motivation

Mutable tags (@v7, @v1) let an upstream retag change what runs in CI — including the workflows holding PRO_ACCESS_TOKEN, NPM_AUTH_TOKEN, and the release path. enforce-labels.yml and sync-labels.yml were already pinned (#307); this finishes the rest.

Solution

All 45 external uses: refs across 6 workflows pinned to full commit SHAs with a # vX.Y.Z comment.

Each SHA is the commit the tag pointed at when this branch was cut (gh api repos/<owner>/<repo>/commits/<tag>), so nothing upstream is adopted here — no behavior change. aws-actions/setup-sam publishes only major tags, hence its bare # v3. Dependabot bumps SHA and comment together. The 3 local ./.github/... refs stay unpinned.

Also corrects one misleading pre-existing comment: sync-labels.yml's pin read # main, which claims to track a branch that has since moved 8 commits ahead. localstack/meta publishes no tags, so it now reads # main @ 2026-04-22 — the branch and the date it was pinned from. The commit is unchanged, and the reusable workflow we consume hasn't changed since.

Verification

git diff -U0 shows only uses: lines changed; no external ref lacks a 40-char SHA; all workflows still parse. CI on this PR is the real check.

Docs

Nothing to document.

CI-only change — no user-facing behavior, flags, config, or output.

Review

Self-merge candidate. Every line is a tag-to-SHA swap a reviewer can verify with gh api repos/<owner>/<repo>/commits/<tag>.

Closes DEVX-978

Co-Authored-By: Claude noreply@anthropic.com

@joe4dev joe4dev added semver: patch docs: skip Pull request does not require documentation changes labels Sep 4, 2026
@joe4dev
joe4dev force-pushed the devx-978-pin-github-actions-for-lstk branch 2 times, most recently from 7662ea8 to 5d6a103 Compare September 8, 2026 10:41
@joe4dev
joe4dev marked this pull request as ready for review September 8, 2026 11:40
@joe4dev
joe4dev requested review from a team and peter-smith-phd as code owners September 8, 2026 11:40

@anisaoshafi anisaoshafi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔐

@joe4dev
joe4dev enabled auto-merge (rebase) September 8, 2026 11:59
Co-Authored-By: Claude <noreply@anthropic.com>
@joe4dev
joe4dev force-pushed the devx-978-pin-github-actions-for-lstk branch from 5d6a103 to 905988c Compare September 8, 2026 11:59
@joe4dev
joe4dev merged commit a461f5c into main Sep 8, 2026
20 checks passed
@joe4dev
joe4dev deleted the devx-978-pin-github-actions-for-lstk branch September 8, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs: skip Pull request does not require documentation changes semver: patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants